
import request from '@/utils/requist'

export const CheckProjectDetail = ({ project_type, project_id }) => {
  return request({
    method: 'post',
    url: '/api/project/CheckProjectDetail',
    data: { project_type, project_id }
  })
}

export const Project1Edit = ({
  // token,
  argument_opinion,
  class_investor_mobile,
  class_investor_name,
  id,
  project_name,
  invest_company,
  investment_volume,
  project_appeal,
  project_content,
  project_problem,
  project_scale,
  project_source,
  industry,
  district,
  class_project_manager,
  project_executor,
  class_project_manager_id,
  project_executor_id,


}) => {
  return request({
    method: 'post',
    url: '/api/project/Project1Edit',
    data: {
      // token,
      argument_opinion,
      class_investor_mobile,
      class_investor_name,

      project_name,
      invest_company,
      investment_volume,
      project_appeal,
      project_content,
      project_problem,
      project_scale,
      project_source,
      industry,
      district,
      class_project_manager,
      project_executor,
      id: parseInt(id),
      class_project_manager_id: parseInt(class_project_manager_id),
      project_executor_id: parseInt(project_executor_id),
    }
  })
}
export const Project2Edit = ({
  // token,
  class_project_manager,
  construction_type,
  id,
  peihe_unit_target1,
  peihe_unit_target2,
  peihe_unit_time_limit,
  project_executor,
  project_level,
  project_name,
  project_source,
  project_unit,
  related_district,
  time_limit,
  work_target,
  remark,
  class_project_manager_id,
  project_executor_id,
}) => {
  return request({
    method: 'post',
    url: '/api/project/Project2Edit',
    data: {
      // token,
      class_project_manager,
      construction_type,

      peihe_unit_target1,
      peihe_unit_target2,
      peihe_unit_time_limit,
      project_executor,
      project_level,
      project_name,
      project_source,
      project_unit,
      related_district,
      time_limit,
      work_target,
      remark,
      id: parseInt(id),
      class_project_manager_id: parseInt(class_project_manager_id),
      project_executor_id: parseInt(project_executor_id),
    }
  })
}
// 筛选条件-地址
export const getRegion = () => {
  return request({
    method: 'get',
    url: '/api/portraits/industry/getRegion'
  })
}
//   ### info ###
//   # argument_opinion   论证意见
//   # class_investor_mobile   投资人联系方式
//   # class_investor_name   投资人姓名
//   # class_project_manager   项目经理
//   # invest_company   投资主体
//   # investment_volume   协议投资额(万元)
//   # item_stage_id   事项阶段id
//   # project_appeal   项目诉求
//   # project_content   项目内容
//   # project_executor   项目执行人
//   # project_level   项目级别(重点项目/一般项目)
//   # project_name   项目名称
//   # project_problem   项目存在的问题以及需要解决的事项
//   # project_scale   项目规模(亩)
//   # project_source   项目来源



//   ### project ###
//   # class_project_manager   项目经理
//   # construction_type   建设类型
//   # file_people   填报人(负责人)
//   # file_time   填报时间
//   # file_unit   填报单位
//   # item_stage_id   事项阶段id
//   # peihe_unit_target1   配合单位总体目标
//   # peihe_unit_target2   配合单位分项目标
//   # peihe_unit_time_limit   配合单位完成时限
//   # project_content   项目内容
//   # project_executor   项目执行人
//   # project_level   项目级别(重点项目/一般项目)
//   # project_name   项目名称
//   # project_source   项目来源
//   # project_unit   项目单位
//   # related_district   涉及区县(部门)
//   # time_limit   完成时限
//   # work_target   工作目标






//   # taizhang_type   台账类型
//   # project_type   项目类型
//   # project_audit_status   项目审核状态id
//   # project_audit_message   审核信息
//   # item_stage_finish_time   上级事项完成时间
//   # item_stage_fix_time   处理/编辑/修改时间
//   # is_taixin   是否属于太忻经济区(是或否)
//   # file_people_id   填报人id
//   # industry   所属行业
//   # district   项目归属区域
//   # project_unit   项目单位
//   # time_limit   完成时限
//   # related_district   涉及区县(部门)
//   # peihe_unit_target1   配合单位总体目标
//   # peihe_unit_target2   配合单位分项目标
//   # peihe_unit_time_limit   配合单位完成时限
//   # remark   备注
//   # is_examine   是否完成综合审查(是1否0)
//   # is_project_examine   是否完成项目综合审批(是1否0)
//   # is_procedure   是否完成项目待办手续(是1否0)
//   # project_level2   项目分类(好项目/一般项目/缓慢项目)
//   # project_score   项目分数
//   # class_name   项目专班名称
//   # class_lead_department   牵头部门
//   # class_district   承接地
//   # class_industry_department   行业主管部门
//   # class_security_department   要素保障部门
//   # class_security_department_content   要素保障部门工作内容
//   # class_lead_manager   领导小组办公室负责人
//   # class_lead_manager_content   领导小组办公室负责人工作内容 




export const ClassProject1Show = ({ project_id }) => {
  return request({
    method: 'post',
    url: '/api/project/ClassProject1Show',
    data: { project_id }
  })
}

export const ClassProjectEdit = ({
  // token,
  class_district,
  class_industry_department,
  class_lead_department,
  // class_lead_manager,
  class_lead_manager_content,
  class_name,
  project_executor,
  class_project_manager,
  class_security_department,
  class_security_department_content,
  id,
  class_project_manager_id,
  project_executor_id,
}) => {
  return request({
    method: 'post',
    url: '/api/project/ClassProjectEdit',
    data: {
      // token,
      class_district,
      class_industry_department,
      class_lead_department,
      // class_lead_manager,
      class_lead_manager_content,
      class_name,
      project_executor,
      class_project_manager,
      class_security_department,
      class_security_department_content,
      id: parseInt(id),
      class_project_manager_id: parseInt(class_project_manager_id),
      project_executor_id: parseInt(project_executor_id),
    }
  })
}
export const UploadProjectFile = (file) => {
  return request({
    method: 'post',
    url: '/api/project/UploadProjectFile',
    data: file,
    contentType: false,
    processData: false,
  })
}
export const CheckProjectFile = ({ file_type, project_id }) => {
  return request({
    method: 'post',
    url: '/api/project/CheckProjectFile',
    data: { file_type, project_id }
  })
}

export const EditThree = ({
  is_examine,
  is_project_examine,
  is_procedure,
  project_id,
  flag,
  file_type
}) => {
  return request({
    method: 'post',
    url: '/api/project/EditThree',
    data: {
      is_examine,
      is_project_examine,
      is_procedure,
      project_id,
      flag,
      file_type
    }
  })
}
export const GetLogList = ({
  project_id,
  log_type,
  time_range,
  page,
  per_page
}) => {
  return request({
    method: 'post',
    url: '/api/project/GetLogList',
    data: {
      project_id,
      log_type,
      time_range,
      page,
      per_page
    }
  })
}
export const GetItemList = ({ project_id }) => {
  return request({
    method: 'post',
    url: '/api/project/GetItemList',
    data: {
      project_id
    }
  })
}
export const GetDynamicLog = ({ project_id, page, per_page, token }) => {
  return request({
    method: 'post',
    url: '/api/project/GetDynamicLog',
    data: {
      project_id, page, per_page, token
    }
  })
}
export const RemindAudit = ({ project_id, file_type, file_id, token }) => {
  return request({
    method: 'post',
    url: '/api/project/RemindAudit',
    data: {
      project_id, file_type, file_id, token
    }
  })
}


export const ItemDownload = ({ project_id, item_stage_id }) => {
  return request({
    method: 'post',
    url: '/api/project/ItemDownload',
    data: {
      project_id, item_stage_id
    }
  })
}
export const GetClassInfo = ({ class_name }) => {
  return request({
    method: 'post',
    url: '/api/project/GetClassInfo',
    data: {
      class_name
    }
  })
}
export const IsProjectExecutor = ({ project_id }) => {
  return request({
    method: 'post',
    url: '/api/project/IsProjectExecutor',
    data: {
      project_id
    }
  })
}
export const RoleDownBox = () => {
  return request({
    method: 'get',
    url: '/api/power/RoleDownBox',
    // urlType: 'api3'
  })
}
export const OrgDownBox = () => {
  return request({
    method: 'get',
    url: '/api/power/OrgDownBox',
  })
}